package main

import (
	"fmt"
	"os"
	"os/signal"
	"syscall"
)

func main(){
	fmt.Println(os.Getpid())
	sign := make(chan os.Signal)

	signal.Notify(sign,syscall.SIGUSR2,syscall.SIGHUP,syscall.SIGINT)

	switch <-sign{
	case syscall.SIGUSR2:
		fmt.Println("user2")
	case syscall.SIGHUP:
		fmt.Println("hup")
	case syscall.SIGINT:
		fmt.Println("ini")
	}

}
